#ifndef FAVORITESITEM_H
#define FAVORITESITEM_H
#include "abstractfavoritesitem.h"
#include <QPixmap>

namespace ExecTerminalImplNS 
{
    class FavoritesItem: public AbstractFavoritesItem
    {
    public:
        FavoritesItem(const QString & aName, 
            const QPixmap & aIcon, 
            const QString & aUrl, 
            FolderFavoritesItem * prnt = 0);
        
        void setIcon(const QPixmap & aicon);
        
        QString url()const;
        void setUrl(const QString & aUrl);

        bool isFolder()const;

        void readFromDataStream(QDataStream &);
        void writeToDataStream(QDataStream &)const;

    protected:
        friend class FavoritesCreator;
        FavoritesItem(FolderFavoritesItem * prnt = 0);

    private:
        virtual QIcon provideIcon()const;

    private:
        QPixmap theIcon;
        QString theUrl;
    };
}

#endif
